<tr>
    <td>{$data['id']}</td>
    <td>{$data['category_name']}</td>
    <td>
        {if condition="$data['is_active'] eq 1"}
        <button onclick="change(this,{$data['id']},{$data['is_active']})"
                class="btn  btn-success  btn-xs">显示</button>
        {else/}
        <button onclick="change(this,{$data['id']},{$data['is_active']})"
                class="btn  btn-danger  btn-xs">隐藏</button>
        {/if}
    </td>
    <td>
        <button onclick="detail(this)" class="btn btn-xs btn-info" data-toggle="modal"
                data-target="#myModal">编辑</button>
        <button onclick="del(this,{$data['id']})" class="btn btn-xs btn-danger" data-toggle="modal"
                data-target="#myModal">删除</button>
    </td>
</tr>